<template>
  <div class="m-hcity">
    <dl>
      <dt>热门城市：</dt>
      <dd v-for="item in list" :key="item.id">{{ item.name==='市辖区'?item.province:item.name }}</dd>
    </dl>
  </div>
</template>

<script>
export default {
  data(){
    return {
      list:[]
    }
  },
  async mounted(){
    //let {status,data:{hots}}=await this.$axios.get('/geo/hotCity')
    let {status,data:{hots}}=await this.$http.get('data/cities.json').then(res=>{return res})
    if(status===200){
      //splice自己加的
      this.list=hots.splice(0,9)
    }
  }
}
</script>

<style lang="scss">
  @import "@/assets/hot.scss";
</style>
